extends "../../azurlane_ctrl/AzurItem.gd"
func init():
	.init()
	name = "[稀有]糖衣炮弹"
	price = 300
	att.atk = 55
	att.mgiAtk = 55
	att.air = 55
	att.def = 55
	info = "战斗开始时，使位于自己同行对称位置的敌人<眩晕>15秒\n[color=#DC143C]同时装备两件时可升级[/color]"
	
func _connect():
	._connect()
	sys.main.connect("onBattleStart",self,"run2")

func run2():
	if not utils.inBattle(masCha):return
	var cell = masCha.cell
	var cha = sys.main.matCha(Vector2(9 - cell.x, cell.y))
	if cha != null && cha.team != masCha.team:
		cha.addBuff(buff.b_xuanYun.new(15))

func upgrade():
	name = "[color=#FFFF00][史诗]糖衣炮弹"
	info = "战斗开始时，使位于自己同行对称位置的敌人<眩晕>15秒"
	att.atk = 110
	att.mgiAtk = 110
	att.air = 110
	att.def = 110